<template>
  <div class="page-content">
    <el-dialog
      :title="title"
      :visible.sync="detailDialog"
      width="40rem"
      height="50rem"
      :before-close="tableClose"
      class="dialog"
    >
          <div slot="title" class="head">
        <div class="frame-title" style="float: left">
          <h4 style="float: left; margin: 1.25rem">详情信息</h4>
        </div>
      </div>
            <el-card :body-style="{ padding: '0px' }" class="card">
                <el-row style="margin-top: 10px">
                    <span>进货类型: {{detailInfo.type}}</span><br/><br/>
                    <span>货物名称: 张三牌</span><br/><br/>
                    <span>数量: {{detailInfo.total}}</span><br/><br/>
                    <span>金额: {{detailInfo.amount}}</span><br/><br/>
                    <span>经手人: {{detailInfo.total}}</span><br/><br/>
                    <span>备注: {{detailInfo.remark}}</span><br/><br/>
                    <span>时间: {{creatTime}}</span><br/>
                </el-row>
            </el-card>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "DetailInfo",
  props: {
    detailDialog: {
      Boolean,
      default: false,
    },
    //详细信息
      detailInfo:{
        Object,
        default:{}
      }
  },
  computed: {
  },
  data() {
    return {
      //表名
      title: "详情信息",
      creatTime: '' //入库时间
      
    };
  },
  watch: {
    detailInfo: {
      deep: true,
      handler(newValue,oldValue) {  //对数据里的时间进行处理
        this.creatTime = newValue.gmtCreate.split(" ")[0];
      }
    }
  },
  methods: {
    //关闭表单
    closeform() {
      var a = false;
      this.$emit("closeAddDialog", a);
      this.DisplayData();
    },

    // 关闭弹窗
    tableClose() {
      this.$confirm("确认关闭？")
        .then(() => {
          this.closeform();
        })
        .catch(() => {});
    },
  },
};
</script>

<style scoped lang="scss">
.dialog /deep/ .el-dialog__body { //修改el-dialog内部样式
background-color:  	#FAFAFA!important;
} 
.card {
  box-sizing: border-box;
  width: 80%;
  height: 25rem;
  margin: 0 auto;
  margin-top: 1rem;
  padding: 1.25rem;
  padding-left: 20%;
  background-image: url("../../assets/image/background.jpg");
  background-repeat: no-repeat;
  background-size:100%;
}
.head {
      background-color: #04153b;
  margin: -1.25rem -1.55rem -6.25rem -1.72rem;
  padding-bottom: 5rem;
  border-radius: 0.24rem;
  height: 5rem;
  font-size: 1.5rem;
  line-height:  3.125rem;
}
.el-menu {
  background-color: #2c3e50;
  /* margin: -20px -20px 0px -0px; */
  margin: 0px 20px 0px 100px;
}

.frame-title {
  /* background-color: #d1ff38; */
  color: #f0f0f0;
  width: 100%;
  height: 30px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}
</style>

